Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects


About Color Set Objects

A color set is a QuickDraw GX object that contains a list of colors. Color sets exist to provide the colors for indexed color space. Bitmaps and other shapes that use indexed color space specify colors as indexes into a color set. Color sets are the QuickDraw GX equivalents to color tables in other graphics systems.

QuickDraw GX identifies an individual color set object through a color set reference. To obtain information about a color set object, you must send its reference as a parameter to a QuickDraw GX function (except that you can determine if two references identify the same color set object simply by comparing them for equality, and you can examine a reference to see if it is nil).

Any QuickDraw GX color (gxColor structure) that contains an indexed color value includes a reference to a color set object. If a shape's ink object has a color in indexed color space, the color includes a reference to a color set object. If the bitmap in a view device object uses indexed color values for its pixels, the bitmap includes a reference to a color set object. (View devices are described in the chapter "View-Related Objects" in this book.)

Color sets can be device independent because their colors, like any QuickDraw GX colors, can be matched across devices. The color information is valid for any display device on which the shapes the color sets apply to are drawn.


Subtopics
Color Set Properties
Color Values in a Color Set
Default Color Sets

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996